<%@ Page Language="C#" MasterPageFile="~/DoctorForum.Master" AutoEventWireup="true" CodeBehind="CreateTopic.aspx.cs" Inherits="WebForum.CreateTopic" Title="Doctor Forum" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <table width="100%">
        <tr>
            <td align="right">
                Forum:</td>
            <td>
                <asp:DropDownList ID="DropDownListForum" runat="server" DataSourceID="ObjectDataSource1" DataTextField="Title" DataValueField="Id" AutoPostBack="true">
                    <asp:ListItem Value="0">Choice Forum</asp:ListItem>
                </asp:DropDownList>&nbsp;</td>
            <td style="width: 3px">
            </td>
        </tr>
        <tr>
            <td align="right">
                Sub Forum:</td>
            <td>
                <asp:DropDownList ID="DropDownListSubForum" runat="server" DataSourceID="ObjectDataSource2" DataTextField="Title" DataValueField="Id" AutoPostBack="true">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="DropDownListSubForum" Display="Dynamic" ErrorMessage="You must choice sub forum to post topic"></asp:RequiredFieldValidator></td>
            <td style="width: 3px">
            </td>
        </tr>
        <tr>
            <td align="right">
                Topic Title:</td>
            <td>
                <asp:TextBox ID="TextBoxTitle" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBoxTitle" Display="Dynamic" ErrorMessage="Enter Topic Title"></asp:RequiredFieldValidator></td>
            <td style="width: 3px">
            </td>
        </tr>
        <tr>
            <td align="right">
                Topic Content:</td>
            <td>
                &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBoxContent"></asp:RequiredFieldValidator></td>
            <td style="width: 3px">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="3">
                <asp:TextBox ID="TextBoxContent" runat="server" TextMode="MultiLine" Width="100%"></asp:TextBox>&nbsp;</td>
        </tr>
        <tr>
            <td align="right">
            </td>
            <td>
                <asp:Button ID="ButtonSubmit" runat="server" OnClick="ButtonSubmit_Click" Text="Submit" />&nbsp;<asp:Button ID="ButtonCancel" runat="server" Text="Cancel" OnClick="ButtonCancel_Click" CausesValidation="False" /></td>
            <td style="width: 3px">
            </td>
        </tr>
    </table>
    <asp:ObjectDataSource ID="ObjectDataSource2" TypeName="WebForum.App_Data.ForumDataSource"
        SelectMethod="List" runat="server">
        <SelectParameters>
                    <asp:ControlParameter Name="pId" PropertyName="SelectedValue" Type="Int32" ControlID="DropDownListForum">
                    </asp:ControlParameter>
                </SelectParameters>
        </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource1" TypeName="WebForum.App_Data.ForumDataSource"
        SelectMethod="List" runat="server"></asp:ObjectDataSource>
</asp:Content>
